package com.flyqiu.flow.boot.events;

import com.alibaba.fastjson2.JSONObject;


import com.flyqiu.flow.event.ProcInstEvent;
import com.flyqiu.flow.event.ProcInstEventContext;
import org.springframework.stereotype.Component;


@Component
public class TestProcInstEvent implements ProcInstEvent {
    @Override
    public void completeBefore(ProcInstEventContext inst) {
        System.out.printf("process:流程:completeBefore：%s%n", inst.getProcInst().getProcInstName());
    }

    @Override
    public void completeAfter(ProcInstEventContext inst) {
        System.out.printf("process:流程:completeAfter：%s%n", inst.getProcInst().getProcInstName());
    }

    @Override
    public void createBefore(ProcInstEventContext inst) {
        System.out.printf("process:流程:createBefore：%s%n", inst.getProcInst().getProcInstName());
    }

    @Override
    public void createAfter(ProcInstEventContext inst) {
        System.out.printf("process:流程:createAfter：%s%n", inst.getProcInst().getProcInstName());
    }

    @Override
    public void deleteBefore(ProcInstEventContext inst, JSONObject params, String reason) {
        System.out.printf("process:流程:deleteBefore：%s%n", inst.getProcInst().getProcInstName());
    }

    @Override
    public void deleteAfter(ProcInstEventContext inst, JSONObject params, String reason) {
        System.out.printf("process:流程:deleteAfter：%s%n", inst.getProcInst().getProcInstName());
    }
}
